// component/twosBar/twosBar.js
Component({
  //组件外部样式类
  externalClasses: ['mine-nav-class'],
  properties: {
    navBar:{
      type:Array,
      value:[]
    }
  },
  data: {
    currentIndex:0
  },
  methods: {
    getnavBarIdx(e){
      // console.log(e.detail)
      let currentIndex = e.detail
      this.setData({currentIndex})
    },
    currentIndexChange(e){
      // console.log(e)
      let currentIdx = e.detail.current
      // 根据id选取子组件,可调用该组件内属性和方法
      let nav = this.selectComponent("#nav-bar")
      nav.setCurrentIndex(currentIdx)
    }
  }
})
